Bayesian model comparison

Author

Milena Musial

Published

March 1, 2024

1 Setup

Code
rm(list=ls())
libs<-c("rstan", "gdata", "bayesplot", "stringr", "dplyr", "ggplot2", "loo", "hBayesDM", "tidyr")
sapply(libs, require, character.only=TRUE)
Loading required package: rstan
Loading required package: StanHeaders

rstan version 2.26.22 (Stan version 2.26.1)
For execution on a local, multicore CPU with excess RAM we recommend calling
options(mc.cores = parallel::detectCores()).
To avoid recompilation of unchanged Stan programs, we recommend calling
rstan_options(auto_write = TRUE)
For within-chain threading using `reduce_sum()` or `map_rect()` Stan functions,
change `threads_per_chain` option:
rstan_options(threads_per_chain = 1)
Loading required package: gdata

Attaching package: 'gdata'
The following object is masked from 'package:stats':

    nobs
The following object is masked from 'package:utils':

    object.size
The following object is masked from 'package:base':

    startsWith
Loading required package: bayesplot
This is bayesplot version 1.11.1
- Online documentation and vignettes at mc-stan.org/bayesplot
- bayesplot theme set to bayesplot::theme_default()
   * Does _not_ affect other ggplot2 plots
   * See ?bayesplot_theme_set for details on theme setting
Loading required package: stringr
Loading required package: dplyr

Attaching package: 'dplyr'
The following objects are masked from 'package:gdata':

    combine, first, last, starts_with
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
Loading required package: ggplot2
Loading required package: loo
This is loo version 2.7.0
- Online documentation and vignettes at mc-stan.org/loo
- As of v2.0.0 loo defaults to 1 core but we recommend using as many as possible. Use the 'cores' argument or set options(mc.cores = NUM_CORES) for an entire session. 

Attaching package: 'loo'
The following object is masked from 'package:rstan':

    loo
Loading required package: hBayesDM
Loading required package: Rcpp


This is hBayesDM version 1.2.1

Attaching package: 'hBayesDM'
The following object is masked from 'package:bayesplot':

    rhat
Loading required package: tidyr

Attaching package: 'tidyr'
The following object is masked from 'package:gdata':

    starts_with
The following object is masked from 'package:rstan':

    extract
    rstan     gdata bayesplot   stringr     dplyr   ggplot2       loo  hBayesDM 
     TRUE      TRUE      TRUE      TRUE      TRUE      TRUE      TRUE      TRUE 
    tidyr 
     TRUE 
Code
datapath <- '/fast/work/groups/ag_schlagenhauf/B01_FP1_WP2/WP2_ILT_CODE/02_Behav_and_Comp_Modeling'
out_path <- '/fast/work/groups/ag_schlagenhauf/B01_FP1_WP2/WP2_ILT_CODE/02_Behav_and_Comp_Modeling/Output'

cbPalette <- c( "#0072B2", "#D55E00", "#009E73", "#CC79A7",
                "#F0E442", "#56B4E9", "#999999", "#E69F00")

2 Step 1: Comparison of random-intercept models

2.1 Load Stan fit files

Code
fit_file_main <- 'fit_n58_2024-04-12_bandit2arm_delta_main_estimation1_delta0.9_stepsize0.5.rds'
fit_file_main_DU <- 'fit_n58_2024-04-12_bandit2arm_delta_main_DU_estimation1_delta0.99_stepsize0.1.rds'
fit_file_PH_withC <- 'fit_n58_2024-04-12_bandit2arm_delta_PH_withC_estimation1_delta0.99_stepsize0.1.rds'
fit_file_PH_withC_DU <- 'fit_n58_2024-04-12_bandit2arm_delta_PH_withC_DU_estimation1_delta0.99_stepsize0.1.rds'

fit_main <- readRDS(file.path(out_path, fit_file_main))
fit_main_DU <- readRDS(file.path(out_path, fit_file_main_DU))
fit_PH_withC <- readRDS(file.path(out_path, fit_file_PH_withC))
fit_PH_withC_DU <- readRDS(file.path(out_path, fit_file_PH_withC_DU))

2.2 Extract log likelihood

Code
# extract log likelihood for each choice
log_likelihood_main <- extract_log_lik(fit_main, parameter_name = "log_lik", merge_chains = T)
log_likelihood_main_DU <- extract_log_lik(fit_main_DU, parameter_name = "log_lik", merge_chains = T)
log_likelihood_PH_withC <- extract_log_lik(fit_PH_withC, parameter_name = "log_lik", merge_chains = T)
log_likelihood_PH_withC_DU <- extract_log_lik(fit_PH_withC_DU, parameter_name = "log_lik", merge_chains = T)

# exclude missing trials
log_likelihood_main <- as.matrix(log_likelihood_main[,log_likelihood_main[1,]!=-999])
log_likelihood_main_DU <- as.matrix(log_likelihood_main_DU[,log_likelihood_main_DU[1,]!=-999])
log_likelihood_PH_withC <- log_likelihood_PH_withC[,log_likelihood_PH_withC[1,]!=-999]
log_likelihood_PH_withC_DU <- log_likelihood_PH_withC_DU[,log_likelihood_PH_withC_DU[1,]!=-999]

2.3 Fit per model

Code
loo_main <- loo(log_likelihood_main)
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Some Pareto k diagnostic values are too high. See help('pareto-k-diagnostic') for details.
Code
print(loo_main)

Computed from 36000 by 5699 log-likelihood matrix.

         Estimate   SE
elpd_loo  -1577.6 40.9
p_loo       134.2 12.7
looic      3155.3 81.8
------
MCSE of elpd_loo is NA.
MCSE and ESS estimates assume independent draws (r_eff=1).

Pareto k diagnostic values:
                         Count Pct.    Min. ESS
(-Inf, 0.7]   (good)     4935  86.6%   228     
   (0.7, 1]   (bad)       425   7.5%   <NA>    
   (1, Inf)   (very bad)  339   5.9%   <NA>    
See help('pareto-k-diagnostic') for details.
Code
plot(loo_main)
Warning in plot.psis_loo(loo_main): 2.3% of Pareto k estimates are Inf/NA/NaN
and not plotted.
Code
if (any(pareto_k_values(loo_main) > 0.7)) {
  loo_main_clean <- loo(log_likelihood_main, k_threshold = 0.7)
  print(loo_main_clean)
  plot(loo_main_clean)
}
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Some Pareto k diagnostic values are too high. See help('pareto-k-diagnostic') for details.

Computed from 36000 by 5699 log-likelihood matrix.

         Estimate   SE
elpd_loo  -1577.6 40.9
p_loo       134.2 12.7
looic      3155.3 81.8
------
MCSE of elpd_loo is NA.
MCSE and ESS estimates assume independent draws (r_eff=1).

Pareto k diagnostic values:
                         Count Pct.    Min. ESS
(-Inf, 0.7]   (good)     4935  86.6%   228     
   (0.7, 1]   (bad)       425   7.5%   <NA>    
   (1, Inf)   (very bad)  339   5.9%   <NA>    
See help('pareto-k-diagnostic') for details.
Warning in plot.psis_loo(loo_main_clean): 2.3% of Pareto k estimates are
Inf/NA/NaN and not plotted.

Code
loo_main_DU <- loo(log_likelihood_main_DU)
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Some Pareto k diagnostic values are too high. See help('pareto-k-diagnostic') for details.
Code
print(loo_main_DU)

Computed from 36000 by 5699 log-likelihood matrix.

         Estimate   SE
elpd_loo  -1595.5 42.2
p_loo       122.9 13.2
looic      3191.0 84.4
------
MCSE of elpd_loo is NA.
MCSE and ESS estimates assume independent draws (r_eff=1).

Pareto k diagnostic values:
                         Count Pct.    Min. ESS
(-Inf, 0.7]   (good)     4847  85.1%   899     
   (0.7, 1]   (bad)       340   6.0%   <NA>    
   (1, Inf)   (very bad)  512   9.0%   <NA>    
See help('pareto-k-diagnostic') for details.
Code
plot(loo_main_DU)
Warning in plot.psis_loo(loo_main_DU): 2% of Pareto k estimates are Inf/NA/NaN
and not plotted.
Code
if (any(pareto_k_values(loo_main_DU) > 0.7)) {
  loo_main_DU_clean <- loo(log_likelihood_main_DU, k_threshold = 0.7)
  print(loo_main_DU_clean)
  plot(loo_main_DU_clean)
}
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Some Pareto k diagnostic values are too high. See help('pareto-k-diagnostic') for details.

Computed from 36000 by 5699 log-likelihood matrix.

         Estimate   SE
elpd_loo  -1595.5 42.2
p_loo       122.9 13.2
looic      3191.0 84.4
------
MCSE of elpd_loo is NA.
MCSE and ESS estimates assume independent draws (r_eff=1).

Pareto k diagnostic values:
                         Count Pct.    Min. ESS
(-Inf, 0.7]   (good)     4847  85.1%   899     
   (0.7, 1]   (bad)       340   6.0%   <NA>    
   (1, Inf)   (very bad)  512   9.0%   <NA>    
See help('pareto-k-diagnostic') for details.
Warning in plot.psis_loo(loo_main_DU_clean): 2% of Pareto k estimates are
Inf/NA/NaN and not plotted.

Code
loo_PH_withC <- loo(log_likelihood_PH_withC)
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Some Pareto k diagnostic values are too high. See help('pareto-k-diagnostic') for details.
Code
print(loo_PH_withC)

Computed from 36000 by 5699 log-likelihood matrix.

         Estimate   SE
elpd_loo  -1455.7 39.9
p_loo       168.7 14.8
looic      2911.5 79.9
------
MCSE of elpd_loo is NA.
MCSE and ESS estimates assume independent draws (r_eff=1).

Pareto k diagnostic values:
                         Count Pct.    Min. ESS
(-Inf, 0.7]   (good)     5503  96.6%   669     
   (0.7, 1]   (bad)        64   1.1%   <NA>    
   (1, Inf)   (very bad)  132   2.3%   <NA>    
See help('pareto-k-diagnostic') for details.
Code
plot(loo_PH_withC)
Warning in plot.psis_loo(loo_PH_withC): 2% of Pareto k estimates are Inf/NA/NaN
and not plotted.
Code
if (any(pareto_k_values(loo_PH_withC) > 0.7)) {
  loo_PH_withC_clean <- loo(log_likelihood_PH_withC, k_threshold = 0.7)
  print(loo_PH_withC_clean)
  plot(loo_PH_withC_clean)
}
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Some Pareto k diagnostic values are too high. See help('pareto-k-diagnostic') for details.

Computed from 36000 by 5699 log-likelihood matrix.

         Estimate   SE
elpd_loo  -1455.7 39.9
p_loo       168.7 14.8
looic      2911.5 79.9
------
MCSE of elpd_loo is NA.
MCSE and ESS estimates assume independent draws (r_eff=1).

Pareto k diagnostic values:
                         Count Pct.    Min. ESS
(-Inf, 0.7]   (good)     5503  96.6%   669     
   (0.7, 1]   (bad)        64   1.1%   <NA>    
   (1, Inf)   (very bad)  132   2.3%   <NA>    
See help('pareto-k-diagnostic') for details.
Warning in plot.psis_loo(loo_PH_withC_clean): 2% of Pareto k estimates are
Inf/NA/NaN and not plotted.

Code
loo_PH_withC_DU <- loo(log_likelihood_PH_withC_DU)
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Some Pareto k diagnostic values are too high. See help('pareto-k-diagnostic') for details.
Code
print(loo_PH_withC_DU)

Computed from 36000 by 5699 log-likelihood matrix.

         Estimate   SE
elpd_loo  -1457.4 38.8
p_loo       152.0 10.9
looic      2914.8 77.5
------
MCSE of elpd_loo is NA.
MCSE and ESS estimates assume independent draws (r_eff=1).

Pareto k diagnostic values:
                         Count Pct.    Min. ESS
(-Inf, 0.7]   (good)     5513  96.7%   559     
   (0.7, 1]   (bad)        55   1.0%   <NA>    
   (1, Inf)   (very bad)  131   2.3%   <NA>    
See help('pareto-k-diagnostic') for details.
Code
plot(loo_PH_withC_DU)
Warning in plot.psis_loo(loo_PH_withC_DU): 2% of Pareto k estimates are
Inf/NA/NaN and not plotted.
Code
if (any(pareto_k_values(loo_PH_withC_DU) > 0.7)) {
  loo_PH_withC_DU_clean <- loo(log_likelihood_PH_withC_DU, k_threshold = 0.7)
  print(loo_PH_withC_DU_clean)
  plot(loo_PH_withC_DU_clean)
}
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Some Pareto k diagnostic values are too high. See help('pareto-k-diagnostic') for details.

Computed from 36000 by 5699 log-likelihood matrix.

         Estimate   SE
elpd_loo  -1457.4 38.8
p_loo       152.0 10.9
looic      2914.8 77.5
------
MCSE of elpd_loo is NA.
MCSE and ESS estimates assume independent draws (r_eff=1).

Pareto k diagnostic values:
                         Count Pct.    Min. ESS
(-Inf, 0.7]   (good)     5513  96.7%   559     
   (0.7, 1]   (bad)        55   1.0%   <NA>    
   (1, Inf)   (very bad)  131   2.3%   <NA>    
See help('pareto-k-diagnostic') for details.
Warning in plot.psis_loo(loo_PH_withC_DU_clean): 2% of Pareto k estimates are
Inf/NA/NaN and not plotted.

2.4 Compare model fit

Code
comp <- loo_compare(loo_main_clean, loo_main_DU_clean, loo_PH_withC_clean, loo_PH_withC_DU_clean)
print(comp)
       elpd_diff se_diff
model3    0.0       0.0 
model4   -1.6      14.8 
model1 -121.9      19.7 
model2 -139.8      22.6 

2.5 High pareto k-values: Try 10-fold CV instead

Code
# Load k_fold CV elpds for different models
env_main <- new.env()
elpd_main <- load(file.path(out_path, "elpd_kfold_bandit2arm_delta_main_n58.RData"),env_main)[1]
env_main_DU <- new.env()
elpd_main_DU <- load(file.path(out_path, "elpd_kfold_bandit2arm_delta_main_DU_n58.RData"),env_main_DU)[1]
env_PH_withC <- new.env()
elpd_PH_withC <- load(file.path(out_path, "elpd_kfold_bandit2arm_delta_PH_withC_n58.RData"),env_PH_withC)[1]
env_PH_withC_DU <- new.env()
elpd_PH_withC_DU <- load(file.path(out_path, "elpd_kfold_bandit2arm_delta_PH_withC_DU_n58.RData"),env_PH_withC_DU)[1]
Code
comp2 <- loo_compare(env_main[[elpd_main]], env_main_DU[[elpd_main_DU]], env_PH_withC[[elpd_PH_withC]], env_PH_withC[[elpd_PH_withC_DU]])
print(comp2)
       elpd_diff se_diff
model3    0.0       0.0 
model4    0.0       0.0 
model2 -253.3      45.8 
model1 -371.2      45.4 

3 Step 2: Compare PH withC with different hierarchical structures

3.1 Load Stan fit file

Code
fit_file_PH_withC_hierarchical_group <- 'fit_n58_2024-04-12_bandit2arm_delta_PH_withC_hierarchical_group_estimation1_delta0.9_stepsize0.5.rds'

fit_PH_withC_hierarchical_group <- readRDS(file.path(out_path, fit_file_PH_withC_hierarchical_group))

3.2 Extract log likelihood

Code
# extract log likelihood for each choice
log_likelihood_PH_withC_hierarchical_group <- extract_log_lik(fit_PH_withC_hierarchical_group, parameter_name = "log_lik", merge_chains = T)

# exclude missing trials
log_likelihood_PH_withC_hierarchical_group <- log_likelihood_PH_withC_hierarchical_group[,log_likelihood_PH_withC_hierarchical_group[1,]!=-999]

3.3 Fit per model

Code
loo_PH_withC_hierarchical_group <- loo(log_likelihood_PH_withC_hierarchical_group)
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Some Pareto k diagnostic values are too high. See help('pareto-k-diagnostic') for details.
Code
print(loo_PH_withC_hierarchical_group)

Computed from 36000 by 5699 log-likelihood matrix.

         Estimate   SE
elpd_loo  -1508.7 41.1
p_loo       117.5  9.3
looic      3017.5 82.2
------
MCSE of elpd_loo is NA.
MCSE and ESS estimates assume independent draws (r_eff=1).

Pareto k diagnostic values:
                         Count Pct.    Min. ESS
(-Inf, 0.7]   (good)     5532  97.1%   946     
   (0.7, 1]   (bad)        41   0.7%   <NA>    
   (1, Inf)   (very bad)  126   2.2%   <NA>    
See help('pareto-k-diagnostic') for details.
Code
plot(loo_PH_withC)
Warning in plot.psis_loo(loo_PH_withC): 2% of Pareto k estimates are Inf/NA/NaN
and not plotted.
Code
if (any(pareto_k_values(loo_PH_withC_hierarchical_group) > 0.7)) {
  loo_PH_withC_hierarchical_group_clean <- loo(log_likelihood_PH_withC_hierarchical_group, k_threshold = 0.7)
  print(loo_PH_withC_hierarchical_group_clean)
  plot(loo_PH_withC_clean)
}
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.

Warning: Can't fit generalized Pareto distribution because all tail values are
the same.
Warning: Some Pareto k diagnostic values are too high. See help('pareto-k-diagnostic') for details.

Computed from 36000 by 5699 log-likelihood matrix.

         Estimate   SE
elpd_loo  -1508.7 41.1
p_loo       117.5  9.3
looic      3017.5 82.2
------
MCSE of elpd_loo is NA.
MCSE and ESS estimates assume independent draws (r_eff=1).

Pareto k diagnostic values:
                         Count Pct.    Min. ESS
(-Inf, 0.7]   (good)     5532  97.1%   946     
   (0.7, 1]   (bad)        41   0.7%   <NA>    
   (1, Inf)   (very bad)  126   2.2%   <NA>    
See help('pareto-k-diagnostic') for details.
Warning in plot.psis_loo(loo_PH_withC_clean): 2% of Pareto k estimates are
Inf/NA/NaN and not plotted.

3.4 Compare model fit

Code
comp3 <- loo_compare(loo_PH_withC_clean, loo_PH_withC_hierarchical_group_clean)
print(comp3)
       elpd_diff se_diff
model1   0.0       0.0  
model2 -53.0      57.4  

3.5 High pareto k-values: Try 10-fold CV instead

Code
# Load k_fold CV elpds for different models
env_PH_withC__hierarchical_group <- new.env()
elpd_PH_withC_hierarchical_group <- load(file.path(out_path, "elpd_kfold_bandit2arm_delta_PH_withC_hierarchical_group_n58.RData"),env_PH_withC__hierarchical_group)[1]
Code
comp4 <- loo_compare(env_PH_withC[[elpd_PH_withC]], env_PH_withC__hierarchical_group[[elpd_PH_withC_hierarchical_group]])
print(comp4)
       elpd_diff se_diff
model2     0.0       0.0
model1   -84.0   12314.3